/*
 * @Description:
 * @Author: qingyang
 * @Date: 2022-03-29 10:34:49
 * @LastEditors: qingyang
 * @LastEditTime: 2023-06-29 16:39:14
 */

import { post, get } from '@/utils/http';
import { IDischargeUnitParams, IImportResult } from './model/dischargeFillModel';
export default {
  //报告饼图数据
  getPieData: (taskNo: string) => get(`/inventory/report/getPie`, { taskNo }),

  // 重新生成报告
  createReport: (params: { taskNo: string; objectKey: any }) =>
    post(`/inventory/report/createReport`, params),

  //活动数据单位列表查询
  getDischargeUnit: (params: IDischargeUnitParams) =>
    get(`/inventory/emissionRelation/activityDataUnit/list`, params),

  // 销售数据导入
  salesDataFillImport: (params: FormData): Promise<IImportResult> =>
    post(`/inventory/emission/salesDataFillImport`, params),

  // ems数据同步
  syncEmsData: (params: any): Promise<{ activeData: number }> =>
    post(`/inventory/emission/syncEmsData`, params)
};
